customproperty: Stop supporting the parsing of values
authorBenjamin Otte <otte@redhat.com>
Fri, 20 Nov 2015 23:51:22 +0000 (00:51 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 20 Nov 2015 23:53:47 +0000 (00:53 +0100)
Now that we don't use custom CSS properties anymore, let's fail as early
as possible.

gtk/gtkcsscustomproperty.c

index d401759a61ab3f9430d644c10708cc7083c1e970..fbaa8400bc4efe6a4350cd3fe0050b3b8658556f 100644 (file)
@@ -51,40 +51,10 @@ static GtkCssValue *
 gtk_css_custom_property_parse_value (GtkStyleProperty *property,
                                      GtkCssParser     *parser)
 {
-  GtkCssCustomProperty *custom = GTK_CSS_CUSTOM_PROPERTY (property);
-  GValue value = G_VALUE_INIT;
-  gboolean success;
-
-  if (custom->property_parse_func)
-    {
-      GError *error = NULL;
-      char *value_str;
-      
-      g_value_init (&value, _gtk_style_property_get_value_type (property));
-
-      value_str = _gtk_css_parser_read_value (parser);
-      if (value_str != NULL)
-        {
-          success = (* custom->property_parse_func) (value_str, &value, &error);
-          g_free (value_str);
-        }
-      else
-        success = FALSE;
-    }
-  else
-    {
-      g_value_init (&value, gtk_css_custom_property_get_specified_type (custom->pspec));
-
-      success = _gtk_css_style_funcs_parse_value (&value, parser);
-    }
-
-  if (!success)
-    {
-      g_value_unset (&value);
-      return NULL;
-    }
-
-  return _gtk_css_typed_value_new_take (&value);
+  _gtk_css_parser_error_full (parser,
+                              GTK_CSS_PROVIDER_ERROR_NAME,
+                              "Custom CSS properties are no longer supported.");
+  return NULL;
 }
 
 static void